home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / gemfut15.lzh / AESUTOB5.C < prev    next >
C/C++ Source or Header  |  1990-05-27  |  997b  |  38 lines

  1.  
  2. /**************************************************************************
  3.  *
  4.  * AESFAST PD utilties.
  5.  *
  6.  *  Object-related utilities 5...
  7.  *   obj_xtfind
  8.  *
  9.  * 05/26/90 - v1.4 
  10.  *            >  This module is new with this release.
  11.  *************************************************************************/
  12.  
  13. #include <gemfast.h>
  14.  
  15. /**************************************************************************
  16.  *
  17.  * obj_xtfind - Return index of object with specified extended object type.
  18.  *
  19.  *************************************************************************/
  20.  
  21. obj_xtfind(ptree, parent, xtype)
  22.     register OBJECT *ptree;
  23.     register int    parent; 
  24.     register char   xtype;
  25. {
  26.     register int    curobj;
  27.  
  28.     curobj = ptree[parent].ob_head;
  29.     while(curobj != parent && curobj != -1) {
  30.         if (xtype == *(char *)&(ptree[curobj].ob_type)) { 
  31.             return curobj;
  32.         }
  33.         curobj = ptree[curobj].ob_next; 
  34.     }
  35.     return -1;
  36. }
  37.  
  38.